package com.myteam.fugaocrm.service;

import java.util.List;
import java.util.Map;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;

import com.myteam.fugaocrm.modle.FgPartnerContact;
import com.myteam.fugaocrm.modle.FgPartnerProduct;
import com.myteam.fugaocrm.sqldb.mapper.FgPartnerContactMapper;

@Service
public class PartnerContactServiceImpl implements BaseService {

	@Resource protected FgPartnerContactMapper fgPartnerContactMapper;
	
	public List<FgPartnerContact> all() {
		return fgPartnerContactMapper.all();
	}
	
	public void deleteOne(Integer contactId) {
		fgPartnerContactMapper.deleteOne(contactId);
	}
	
	public void insert(Map<String, Object> params) {
		fgPartnerContactMapper.insert(params);
	}
	
	public void update(Map<String, Object> params) {
		fgPartnerContactMapper.update(params);
	}
	
	/**
	 * 根据供应商公司ID查询该公司全部联系人
	 * @param partnerProductId
	 * @return
	 */
	public List<FgPartnerContact> selectList(Integer partnerCompanyId) {
		return fgPartnerContactMapper.selectList(partnerCompanyId);
	}
}
